<template>
  <div class="app-container home">
    <img class="box1" src="../assets/images/1.jpg" />
  </div>
</template>

<script>
import { querybouncedzt } from "@/api/sportnotice/notice";
import { getUserProfile } from "@/api/system/user"; //引入当前用户admin
export default {
  name: "Index",
  data() {
    return {
      // 版本号
        //管理员权限
      user: {},
      version: "",
    };
  },
  created() {
    this.querybounced(); // 查询有未审核的新闻稿
    this.getUser(); //通知弹框
  },

  methods: {
    // 查询管理员有未审核的新闻稿
    querybounced() {
      querybouncedzt().then((response) => {
        if (response.data) {
          const h = this.$createElement;
          this.$notify.info({
            title: "通知新闻公告",
            message: h(
              "i",
              { style: "color: #F56C6C" },
              "你有最新通知新闻稿公告,请注意查收哦!"
            ),
            offset: 85,
          });
        } 
        
        
        else {
          return null;
        }
        console.log(response.data);
      });
    },

      //调用admin 登录时  审核权限生成
    getUser() {
      getUserProfile().then((response) => {
        this.user = response.data;
        this.roleGroup = response.roleGroup;
        this.postGroup = response.postGroup;
      });
    },
  },
};
</script>

<style scoped lang="scss">
.box1 {
  padding: 0px;
  margin: 0px;
  width: 100%;
  height: 810px;
}
.home {
  blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }
  hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eee;
  }
  .col-item {
    margin-bottom: 20px;
  }

  ul {
    padding: 0;
    margin: 0;
  }

  font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;

  ul {
    list-style-type: none;
  }

  h4 {
    margin-top: 0px;
  }

  h2 {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 100;
  }

  p {
    margin-top: 10px;

    b {
      font-weight: 700;
    }
  }

  .update-log {
    ol {
      display: block;
      list-style-type: decimal;
      margin-block-start: 1em;
      margin-block-end: 1em;
      margin-inline-start: 0;
      margin-inline-end: 0;
      padding-inline-start: 40px;
    }
  }
}
</style>

